@extends('backend.layouts.main')
@section('content')
<section class="content-header">
    <h1>
        菜单列表
    </h1>
    <ol class="breadcrumb">
        <li><a href="{{URL('admin/index')}}"><i class="fa fa-dashboard"></i> 首页</a></li>
        <li><a href="{{URL('admin/permissions')}}">权限</a></li>
    </ol>
</section>
<section class="content">
    <div class="row">
        <div class="col-md-12">
            <div class="box">
                {!!view("backend.permissions._search",['request'=>$request])->render()!!}
                <!-- /.box-header -->
                <div class="box-body  table-responsive">
                    <table class="table table-striped table-bordered">
                        <thead>
                            <tr>
                                <th style="width: 10px">#</th>
                                <th>菜单名称</th>
                                <th>路由</th>
                                <th>操作时间</th>
                                <th>操作</th>
                            </tr>
                        </thead>
                        @if(!empty($permissionsDatas[0]->id))
                        @foreach($permissionsDatas AS $key=>$permissionsData)
                        <tr style="color:#888;font-weight:normal">
                            <td></td>
                            <td style="cursor:pointer" onclick="iframe('详情','permission/menusView/{{encryptionUrl($permissionsData->id)}}')">
                                {{$permissionsData->permissions_name}}
                            </td>
                            <td>{{$permissionsData->urls}}</td>
                            <td>{{$permissionsData->created_at}}</td>
                            <td>
                                <a type="button" onclick="iframe('新增权限', 'permission/permissionsView/{{encryptionUrl($permissionsData->id)}}')" class="btn btn-primary btn-sm"><i class="fa fa-plus"></i>添加权限</a>
                                <a type="button" onclick="iframe('菜单详情','permission/menusView/{{encryptionUrl($permissionsData->id)}}')" class="btn btn-success btn-sm"><i class="fa fa-eye"></i>菜单详情</a>
                                <a type="button" onclick="iframe('修改权限','permissions/{{encryptionUrl($permissionsData->id)}}/edit')" class="btn btn-info btn-sm"><i class="fa fa-edit "></i> 修改</a>
                                <!--<a type="button" href="permissions/{{$permissionsData->id}}" class="btn btn-warning btn-sm"><i class="fa fa-hand-paper-o"></i>审核</a>-->
                                <a type="button" onclick="delConfirm('permissions/{{encryptionUrl($permissionsData->id)}}', 'permissions')" class="btn btn-danger btn-sm"><i class="fa fa-close"></i>删除</a>
                            </td>
                        </tr>
                        @endforeach
                        @else
                        <tr style="color:#888;font-weight:normal">
                            <td colspan="5" align="center">暂无数据</td>
                        </tr>
                        @endif
                    </table>
                </div>
                {!!view("backend.common._page",['datas'=>$permissionsDatas,'request'=>$request])->render()!!}
            </div>
        </div>
    </div>
</section>
{!!view("backend.common.status")->render()!!}
@endsection